package com.youmu.sichuansfc.domain;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "youmu_user", schema = "youmu", catalog = "")
public class YoumuUser {
    private Long id;
    private Date addTime;
    private String name;
    private String pic;
    private String password;
    private Boolean isDelete;

    public void setId(long id) {
        this.id = id;
    }

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "add_time")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "pic")
    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    @Basic
    @Column(name = "is_delete")
    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YoumuUser youmuUser = (YoumuUser) o;
        return id == youmuUser.id &&
                isDelete == youmuUser.isDelete &&
                Objects.equals(addTime, youmuUser.addTime) &&
                Objects.equals(name, youmuUser.name) &&
                Objects.equals(pic, youmuUser.pic) &&
                Objects.equals(password, youmuUser.password);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, addTime, name, pic, password, isDelete);
    }
}
